<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

	<title>后台处理新闻种类的页面</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css"
		href="${pageContext.request.contextPath }/css/style.css">
	<link href="${pageContext.request.contextPath }/css/addChance.css"
		rel="stylesheet" type="text/css">
	<link href="${pageContext.request.contextPath }/css/Admin.css"
		rel="stylesheet" type="text/css">

	<script type="text/javascript">
		function doDel(id){
			if ( window.confirm("确定删除此新闻类型？") ){
				window.location.href = "doDeleteNewsTypeAction.action?newsType.pid="+id;
			}
		}
		function doEdit(id){
				window.location.href = "initForUpdateNewsTypeAction.action?newsType.pid="+id;
			
		}
		function doDetail(id){
				window.location.href = "<%=path%>/queryOneBusNew.do?id="+id;
			
		}
		
		function doSearch(){
		var url="<%=path %>/showAllBusType.do?currentpage="+document.getElementById('currentPage').value;
		var form=document.getElementById('myform');
		form.action=url;
		form.submit();
		}
		function toPage(id){
		var form=document.getElementById('myform');
		form.action="<%=path%>/showAllBusType.do?currentpage="+id;
		form.submit();
		}
		function checkPage(){
			var name=document.getElementById('currentPage').value;
			if(isNaN(name)){

			document.getElementById('currentPage').value="";
			document.getElementById('currentPage').focus();
		}
		}
	</script>
</head>

<body>
<form action="<%=path %>/showAllBusType.do" id="myform" method="post">
	<table width="100%">
		<tr>
			<TD width="2%" height=33>
				<DIV align=center>
					<IMG src="<%=path%>/images/sy.gif">
				</DIV>
			</TD>
			<td>
				<div align="left">
					<strong>系统管理 > 新闻种类管理</strong>
				</div>
			</td><!-- 
			<td>
				<input type="text" name="keyWord" size=25 class="FormBase"
					onfocus="this.className='FormFocus';"
					onblur="this.className='FormBase';" value="${key }" />
				<input type="image" src="<%=path%>/images/search.gif"
					align="middle" onclick="doSearch();" />
			</td> -->
			<td>
				<input type="button" name="stus" value="添加新闻种类" class="anybutton"
					onClick="javascript:location.href='addNewsType.jsp'" />
			</td>
			<td align=right>

			</td>
		</tr>
	</table>
	<table id=content cellSpacing=1 cellPadding=4 width="100%"
		bgColor=#c0ccdd border=0>
		<tr class="top">
			<td scope="col">
				种类名
			</td>
			<td scope="col">
				优先级
			</td>
			<td scope="col">
				修改
			</td>
			<td scope="col">
				删除
			</td>
		</tr>
			<s:iterator  value="newsTypes" >
				<tr bgcolor="f9fff0">
					<td align="center">
					<s:property value="newsType"/>
					</td>
					<td align="center">
						<s:property value="orderNumber"/>
					</td>
					<td align="center">
						<img onclick="doEdit('${pid }');" title="修改"
							src="<%=path%>/images/bt_edit.gif" class="op_button" alt="修改信息"
							border="0" />
					</td>
					<td align="center">
						<img onclick="doDel('${pid }');" title="删除"
							src="<%=path%>/images/bt_del.gif" class="op_button" alt="删除信息"
							border="0" />
					</td>
				</tr>
			</s:iterator>
	</table>

</form>
</body>

</html>
